﻿@{
    ViewBag.Title = "HomePage";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<h2>HomePage</h2>

    $(".cardBack").click(function () {  
        var x = $(this);
        x.hide();
        console.log(this.id);
        var card1 = x.next().children();
        var card2 = $(".cardBack").click(function () {  
                        var x = $(this);
                        x.hide();
        
                        var card1 = x.next().children();
                        return card1;
        });
        if (card1.attr("class") == card2.attr("class"))
        {
            alert("þú fékkst slag dumm duummm");
        }
      
    });